<?php

class WareForm {

    public function __construct($title, $form_id) {
        $this->title = $title;
        $this->form_id = $form_id;
        $this->itemscode = "";
    }

    public function addItem($WFItem) {//WareFormItem to Wareform
        if (strlen($this->itemscode) > 0) {
            $this->itemscode = $this->itemscode . Sympols::$split2 . $WFItem->getCode();
        } else {
            $this->itemscode = $WFItem->getCode();
        }
    }

    public function getCode() {
        return "form" . Sympols::$split1 . $this->title . Sympols::$split1 . $this->form_id . Sympols::$split1 . $this->itemscode;
    }

}

?>
